package com.xjh.controller;

import com.xjh.basestudy.javabase.thread_final.threadpool.demo.ThreadPoolUtils;
import com.xjh.basestudy.javabase.thread_final.threadpool.demo.method;
import com.xjh.utils.resultutils.ResponseObj;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author:XuJianHua
 * @Date:2022/10/28
 * @Description:
 */
@RestController
@RequestMapping("/api/juc")
@Slf4j
public class TestJUCController {
  @GetMapping("/index1")
  public ResponseObj testBeanSearcher() {
    method method = new method();
    System.out.println("0");
    System.out.println("0");
    System.out.println("0");
    System.out.println("0");
    System.out.println("0");
    System.out.println("0");
    ThreadPoolUtils.execute(()-> method.test1());
    System.out.println("2");
    System.out.println("2");
    System.out.println("2");
    System.out.println("2");
    System.out.println("2");
    System.out.println("2");
    System.out.println("2");
    System.out.println("2");
    System.out.println("2");
    System.out.println("2");

    return null;
  }

}
